import { Prisma } from '@prisma/client';

import { prisma } from '../helper';

export const initSysMenu = async () => {
  const data: Prisma.SysMenuCreateManyInput[] = [
    {
      id: 1,
      menuType: 'menu',
      menuName: 'login',
      iconType: 1,
      icon: null,
      routeName: 'login',
      routePath:
        '/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?',
      component: 'layout.blank$view.login',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: true,
      pid: 0,
      order: 0,
      i18nKey: 'route.login',
      keepAlive: false,
      constant: true,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 2,
      menuType: 'menu',
      menuName: '403',
      iconType: 1,
      icon: null,
      routeName: '403',
      routePath: '/403',
      component: 'layout.blank$view.403',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: true,
      pid: 0,
      order: 0,
      i18nKey: 'route.403',
      keepAlive: false,
      constant: true,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 3,
      menuType: 'menu',
      menuName: '404',
      iconType: 1,
      icon: null,
      routeName: '404',
      routePath: '/404',
      component: 'layout.blank$view.404',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: true,
      pid: 0,
      order: 0,
      i18nKey: 'route.404',
      keepAlive: false,
      constant: true,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 4,
      menuType: 'menu',
      menuName: '500',
      iconType: 1,
      icon: null,
      routeName: '500',
      routePath: '/500',
      component: 'layout.blank$view.500',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: true,
      pid: 0,
      order: 0,
      i18nKey: 'route.500',
      keepAlive: false,
      constant: true,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 5,
      menuType: 'menu',
      menuName: 'iframe-page',
      iconType: 1,
      icon: null,
      routeName: 'iframe-page',
      routePath: '/iframe-page/:url',
      component: 'layout.base$view.iframe-page',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: true,
      pid: 0,
      order: 0,
      i18nKey: 'route.iframe-page',
      keepAlive: false,
      constant: true,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 50,
      menuType: 'menu',
      menuName: 'home',
      iconType: 1,
      icon: 'mdi:monitor-dashboard',
      routeName: 'home',
      routePath: '/home',
      component: 'layout.base$view.home',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: false,
      pid: 0,
      order: 0,
      i18nKey: 'route.home',
      keepAlive: false,
      constant: false,
      href: null,
      multiTab: false,
      createdAt: '2024-05-15T00:00:00.000Z',
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 54,
      menuType: 'directory',
      menuName: 'manage',
      iconType: 1,
      icon: 'carbon:cloud-service-management',
      routeName: 'manage',
      routePath: '/manage',
      component: 'layout.base',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: false,
      pid: 0,
      order: 4,
      i18nKey: 'route.manage',
      keepAlive: false,
      constant: false,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 62,
      menuType: 'menu',
      menuName: 'manage_menu',
      iconType: 1,
      icon: 'material-symbols:route',
      routeName: 'manage_menu',
      routePath: '/manage/menu',
      component: 'view.manage_menu',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: false,
      pid: 54,
      order: 2,
      i18nKey: 'route.manage_menu',
      keepAlive: true,
      constant: false,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 63,
      menuType: 'menu',
      menuName: 'manage_role',
      iconType: 1,
      icon: 'carbon:user-role',
      routeName: 'manage_role',
      routePath: '/manage/role',
      component: 'view.manage_role',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: false,
      pid: 54,
      order: 1,
      i18nKey: 'route.manage_role',
      keepAlive: false,
      constant: false,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 64,
      menuType: 'menu',
      menuName: 'manage_user',
      iconType: 1,
      icon: 'ic:round-manage-accounts',
      routeName: 'manage_user',
      routePath: '/manage/user',
      component: 'view.manage_user',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: false,
      pid: 54,
      order: 0,
      i18nKey: 'route.manage_user',
      keepAlive: false,
      constant: false,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 65,
      menuType: 'menu',
      menuName: 'manage_user-detail',
      iconType: 1,
      icon: null,
      routeName: 'manage_user-detail',
      routePath: '/manage/user-detail/:id',
      component: 'view.manage_user-detail',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: 'manage_user',
      hideInMenu: true,
      pid: 54,
      order: 3,
      i18nKey: 'route.manage_user-detail',
      keepAlive: false,
      constant: false,
      href: null,
      multiTab: false,
      createdAt: '2024-05-15T00:00:00.000Z',
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 51,
      menuType: 'menu',
      menuName: 'access-key',
      iconType: 1,
      icon: 'carbon:document-signed',
      routeName: 'access-key',
      routePath: '/access-key',
      component: 'layout.base$view.access-key',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: false,
      pid: 0,
      order: 0,
      i18nKey: 'route.access-key',
      keepAlive: false,
      constant: false,
      href: null,
      multiTab: false,
      createdAt: '2024-05-15T00:00:00.000Z',
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 52,
      menuType: 'directory',
      menuName: 'log',
      iconType: 1,
      icon: 'carbon:login',
      routeName: 'log',
      routePath: '/log',
      component: 'layout.base',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: false,
      pid: 0,
      order: 0,
      i18nKey: 'route.log',
      keepAlive: false,
      constant: false,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 71,
      menuType: 'menu',
      menuName: 'log_login',
      iconType: 1,
      icon: 'carbon:login',
      routeName: 'log_login',
      routePath: '/log/login',
      component: 'view.log_login',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: false,
      pid: 52,
      order: 0,
      i18nKey: 'route.log_login',
      keepAlive: false,
      constant: false,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
    {
      id: 72,
      menuType: 'menu',
      menuName: 'log_operation',
      iconType: 1,
      icon: 'carbon:login',
      routeName: 'log_operation',
      routePath: '/log/operation',
      component: 'view.log_operation',
      pathParam: null,
      status: 'ENABLED',
      activeMenu: null,
      hideInMenu: false,
      pid: 52,
      order: 0,
      i18nKey: 'route.log_operation',
      keepAlive: false,
      constant: false,
      href: null,
      multiTab: false,
      createdBy: '-1',
      updatedAt: null,
      updatedBy: null,
    },
  ];

  return prisma.sysMenu.createMany({ data });
};
